FILESEXTRAPATHS:prepend:feitenge2000 := "${THISDIR}/${PN}:"
FILESEXTRAPATHS:prepend := "${THISDIR}/${PKG_NAME}:"

SRC_URI:append:feitenge2000 = "\
    file://config.json \
    file://manu_config.json \
    file://export-pwm.sh \
    file://export-pwm.service \
    file://phosphor-pid-control.service \
   "
FILES:${PN}:append:feitenge2000 = " usr/share/swampd/config.json"
FILES:${PN}:append:feitenge2000 = " usr/share/swampd/manu_config.json"
FILES:${PN}:append:feitenge2000 = " usr/bin/export-pwm.sh"

RDEPENDS:${PN} += "bash"

#inherit obmc-phosphor-systemd

SYSTEMD_SERVICE:${PN}:append:feitenge2000 += "phosphor-pid-control.service"
SYSTEMD_SERVICE:${PN}:append:feitenge2000 += "export-pwm.service"

do_install:append:feitenge2000() {
    install -d ${D}/usr/bin
    install -m 0755 ${WORKDIR}/export-pwm.sh ${D}/usr/bin/export-pwm.sh
    install -d ${D}/usr/share/swampd
    install -m 0755 ${WORKDIR}/config.json ${D}/usr/share/swampd/config.json
    install -m 0755 ${WORKDIR}/manu_config.json ${D}/usr/share/swampd/manu_config.json
    
    install -d ${D}${systemd_system_unitdir}
    install -m 0644 ${WORKDIR}/phosphor-pid-control.service \
        ${D}${systemd_system_unitdir}
    install -m 0644 ${WORKDIR}/export-pwm.service ${D}${systemd_system_unitdir}
}
